The non-volatile memory takes advantage of the non-mechanical structure, small size, low noise, anti-vibration, low power consumption and fast read and write speed. Therefore, it is applied to various data storage devices, such as solid state disk (SSD), USB flash drive or RAID (Redundant Array of Independent Drives).
According to these characteristics of the non-volatile memory, a physical block comprises a plurality of physical pages. When a host system (such as host computer) communicates a data write memory, it takes a physical page or a smaller sector as a unit to write sequentially. The physical page stored a data must execute an erasing program first, then writing other data, and the smallest unit of the erasing program is a physical block. The non-volatile memory has write or erase limits of life-time so that if the non-volatile memory exceeds the upper limit of write or erase times, it will reduce the operating speed, cause damage and cause the entire memory damage.
Referring to FIG. 1, the data storage system 10 having the physical storage memory 15 includes a memory manager 19, which can transfer the logic sector address 11 (Logical Sector Address; LSA) communicated or saved by the host system 20 to a logic block and a logic page, and the logic block and logic page are corresponded pointing to a physical block and a physical page of the physical storage memory 15, and the physical page has a physical storage address 13. The mapping relation between logic sector address 11 and physical storage address 13 is recorded in a logic-physical address mapping table 17.
When the host system 20 moves the stored data from a (first) logic sector address L_1 to another (second) logic sector address L_4, the host system 20 must deliver a normal command 291, such as a move command, to the memory manager 19. And the host system 20 and/or memory manager 19 perform the followings: (a) Read and duplicate the first logic sector address L_1 corresponding and pointing to the stored data D_A (stored in the physical storage memory (B1, P0)) to a memory buffer 25; (b) Write the stored data D_A temporarily stored in the memory buffer 25 to another physical storage memory (B0, P2) which the second logic sector address L_4 pointing to; and (c) Delete or set the stored data (D_A) of the logic sector address L_1 invalid.
The program is more complicated for the same data moving command in a disc array system having parity bit check (parity) function, such as RAID4, RAID5 or RAID6. When the host system 20 moves a stored data from a logic sector address L_A to another logic sector address L_B, the host system 20 and/or memory manager 19 will control and perform the followings: (a) Read the stored data D_A stored in a physical storage address, which the logic sector address L_A pointed, to the memory buffer 25; (b) Read the parity bit check block data P_A of the data stripe S_A of RAID, which is corresponding to the logic sector address L_A, to the memory buffer 25; (c) Read the stored data D_B stored in the physical storage address, which the logic sector address L_B pointed, to memory buffer 25; (d) Read the parity bit check block data P_B of the data stripe S_B of RAID, which is corresponding to the logic sector address L_B, to the memory buffer 25; (e) Calculate (such as XOR operation) the new parity bit check block data P_A2 of the logic sector address L_A by the stored data D_A, parity bit check block data P_A and a blank data; (f) Calculate (such as XOR operation) the new parity bit check block data P_B2 of the logic sector address L_B by the stored data D_B, parity bit check block data P_B and the stored data D_A; (g) Write the stored data D_A temporarily stored in memory buffer 25 to the logic sector address L_B; (h) Write new parity bit check data P_B2 temporarily stored in memory buffer 25 to the parity bit check block of the data stripe S_B of RAID; (i) Delete or set the stored data D_A of the logic sector address L_A invalid; and (j) Write the new parity bit check data P_A2 temporarily stored in memory buffer 25 to the parity bit check block of the data stripe S_A of RAID.
Although conventional data storage system 10 can execute read, write, delete and/or move commands, but each command must be transmitted respectively. If the user wants to check the moved storage data in the step of data moving, it must transmit two commands of reading and moving respectively. After conventional moving command, the data storage system 10 must perform various actions of reading and moving so that it will possible to improve the lifetime or efficiency of data storage system 10.